(global.webpackJsonp = global.webpackJsonp || []).push([ [ "wjyk_recycle/pages/recycle-order/recycle-order" ], {
    "15bc": function(e, n, t) {
        t.r(n);
        var r, o = t("21c2"), c = t.n(o);
        for (r in o) "default" !== r && function(e) {
            t.d(n, e, function() {
                return o[e];
            });
        }(r);
        n.default = c.a;
    },
    "21c2": function(e, r, u) {
        (function(o) {
            Object.defineProperty(r, "__esModule", {
                value: !0
            }), r.default = void 0;
            var e, c = (e = u("4795")) && e.__esModule ? e : {
                default: e
            };
            function l(e, n, t, r, o, c, u) {
                try {
                    var a = e[c](u), l = a.value;
                } catch (e) {
                    return t(e), 0;
                }
                a.done ? n(l) : Promise.resolve(l).then(r, o);
            }
            function n(a) {
                return function() {
                    var e = this, u = arguments;
                    return new Promise(function(n, t) {
                        var r = a.apply(e, u);
                        function o(e) {
                            l(r, n, t, o, c, "next", e);
                        }
                        function c(e) {
                            l(r, n, t, o, c, "throw", e);
                        }
                        o(void 0);
                    });
                };
            }
            var t = {
                data: function() {
                    return {
                        currentIndex: 0,
                        navArr: [ {
                            title: "已预约"
                        }, {
                            title: "已接单"
                        }, {
                            title: "已完成"
                        } ],
                        orders: [],
                        unit: ""
                    };
                },
                onShow: function() {
                    this.unit = o.getStorageSync("name"), this.orders = [], this.mescroll.resetUpScroll();
                },
                onLoad: function(e) {
                    this.currentIndex = e.index;
                },
                methods: {
                    openModal1: function(e) {
                        var n = this;
                        this.$refs.pop.show({
                            title: "提示",
                            style: "background-color:#fff;width:600rpx;border-radius:10rpx;",
                            btns: [ {
                                text: "取消",
                                style: "color:#4A8AF4",
                                onTap: function() {
                                    console.log("refuse"), n.closeModal1();
                                }
                            }, {
                                text: "确认",
                                style: "color:#4A8AF4",
                                onTap: function() {
                                    console.log("agree"), n.closeModal1(), n.reserveCancel(e);
                                }
                            } ]
                        });
                    },
                    closeModal1: function() {
                        this.$refs.pop.close();
                    },
                    navbarTapHandler: function(e) {
                        this.currentIndex = e, console.log("11111111111111", this.currentIndex, e), this.orders = [], 
                        this.mescroll.resetUpScroll();
                    },
                    recycleOrder: function(e, n) {
                        console.log("index", e), o.navigateTo({
                            url: "../recycle-order-detail/recycle-order-detail?index=" + e + "&orderid=" + n
                        });
                    },
                    recycleList: function(e) {
                        o.navigateTo({
                            url: "../recycle-list/recycle-list?orderid=" + e
                        });
                    },
                    upCallback: function(t) {
                        var r = this;
                        return n(c.default.mark(function e() {
                            var n;
                            return c.default.wrap(function(e) {
                                for (;;) switch (e.prev = e.next) {
                                  case 0:
                                    return e.next = 2, r.$http({
                                        url: r.$api.reserveOrder,
                                        data: {
                                            uid: o.getStorageSync("uid"),
                                            is_status: Number(r.currentIndex) + 1,
                                            page: t.num,
                                            psize: 5
                                        }
                                    });

                                  case 2:
                                    0 == (n = e.sent).errno && (console.log("用户回收订单", n.data), r.mescroll.endByPage(n.data.list.length, n.totalPage), 
                                    1 == t.num && (r.orders = []), r.orders = r.orders.concat(n.data.list));

                                  case 4:
                                  case "end":
                                    return e.stop();
                                }
                            }, e);
                        }))();
                    },
                    reserveCancel: function(t) {
                        var r = this;
                        return n(c.default.mark(function e() {
                            var n;
                            return c.default.wrap(function(e) {
                                for (;;) switch (e.prev = e.next) {
                                  case 0:
                                    return console.log("取消回收订单"), r.openModal1(), e.next = 4, r.$http({
                                        url: r.$api.userCancel,
                                        data: {
                                            id: t
                                        }
                                    });

                                  case 4:
                                    0 == (n = e.sent).errno && o.showModal({
                                        title: "提示",
                                        showCancel: !1,
                                        content: n.message,
                                        success: function(e) {
                                            if (e.confirm) r.orders = [], r.mescroll.resetUpScroll(); else if (e.cancel) return;
                                        }
                                    });

                                  case 6:
                                  case "end":
                                    return e.stop();
                                }
                            }, e);
                        }))();
                    },
                    callPhone: function(e) {
                        this.$sun.phone(e);
                    }
                }
            };
            r.default = t;
        }).call(this, u("543d").default);
    },
    "361c": function(e, n, t) {
        (function(e) {
            function n(e) {
                return e && e.__esModule ? e : {
                    default: e
                };
            }
            t("8163"), n(t("66fd")), e(n(t("41ae")).default);
        }).call(this, t("543d").createPage);
    },
    "41ae": function(e, n, t) {
        t.r(n);
        var r, o = t("5cf6"), c = t("15bc");
        for (r in c) "default" !== r && function(e) {
            t.d(n, e, function() {
                return c[e];
            });
        }(r);
        t("5f21");
        var u = t("f0c5"), o = Object(u.a)(c.default, o.b, o.c, !1, null, null, null, !1, o.a, void 0);
        n.default = o.exports;
    },
    "5cf6": function(e, n, t) {
        function r() {
            this.$createElement, this._self._c;
        }
        var o = {
            sunuiTab: function() {
                return t.e("components/sunui-tab/sunui-tab").then(t.bind(null, "a269"));
            },
            sunuiPopup: function() {
                return t.e("components/sunui-popup/sunui-popup").then(t.bind(null, "c2fe"));
            }
        }, c = [];
        t.d(n, "b", function() {
            return r;
        }), t.d(n, "c", function() {
            return c;
        }), t.d(n, "a", function() {
            return o;
        });
    },
    "5f21": function(e, n, t) {
        var r = t("7dcb");
        t.n(r).a;
    },
    "7dcb": function(e, n, t) {}
}, [ [ "361c", "common/runtime", "common/vendor" ] ] ]);